Page({  
  data: {  
    imgList: [  
      { url: "cloud://cloud1-1gjvqokx6b94fe58.636c-cloud1-1gjvqokx6b94fe58-1356034262/images/hometab/banner1.jpg" },  
      { url: "cloud://cloud1-1gjvqokx6b94fe58.636c-cloud1-1gjvqokx6b94fe58-1356034262/images/hometab/banner2.jpg" },  
      { url: "cloud://cloud1-1gjvqokx6b94fe58.636c-cloud1-1gjvqokx6b94fe58-1356034262/images/hometab/banner3.jpg" }  
    ],  
    swiperHeight: 300,
    gridData: [
      {
        imageUrl: 'cloud://cloud1-1gjvqokx6b94fe58.636c-cloud1-1gjvqokx6b94fe58-1356034262/images/other/grid1.jpg',
        title: '源头工厂 - 性价比的产品和服务'
      },
      {
        imageUrl: 'cloud://cloud1-1gjvqokx6b94fe58.636c-cloud1-1gjvqokx6b94fe58-1356034262/images/other/grid2.jpg',
        title: '众多案例 - 强大的技术团队和丰富项目经验'
      },
      {
        imageUrl: 'cloud://cloud1-1gjvqokx6b94fe58.636c-cloud1-1gjvqokx6b94fe58-1356034262/images/other/grid3.jpg',
        title: '资质齐全 - 专业人办专业事'
      },
      {
        imageUrl: 'cloud://cloud1-1gjvqokx6b94fe58.636c-cloud1-1gjvqokx6b94fe58-1356034262/images/other/grid4.jpg',
        title: '诚信二十年 - 用心服务,诚信经营,让您更满意'
      }
    ]
  },  
  onLoad() {  
    // 动态适配高度  
    const systemInfo = wx.getSystemInfoSync();  
    this.setData({  
      swiperHeight: systemInfo.windowWidth * 0.75  
    });  
  },

  onGridItemTap(e:any) {
    const index = e.currentTarget.dataset.index;
    console.log('点击了第' + (index + 1) + '个宫格');
    wx.showToast({
      title: this.data.gridData[index].title,
      icon: 'none'
    });
  },

  onbannerItemTap() {
    wx.navigateTo({
      url: `/pages/book_pages/book_pages` 
    });
  },

  onShareAppMessage() {

  },
  onShareTimeline() {
    return {
      title: '深圳市梵英超声技术有限公司', 
    }
  },

});  
